package com.hl.design_mode.create.abstractfactory;

/**
 * @author Administrator
 */
public class ShapeFactory implements AbstractFactory{

    public Object getCar(String name) {
        if (name.equalsIgnoreCase("BM")) {
            return new BM();
        } else if (name.equalsIgnoreCase("BC")) {
            return new BC();
        } else if (name.equalsIgnoreCase("YQDZ")) {
            return new YQDZ();
        }
        throw new NullPointerException();
    }

    @Override
    public Shape getShape(String car) {
        return null;
    }

    @Override
    public Shape getColor(String color) {
        return null;
    }
}
